package com.lj.frame.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
public class Users {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer companyId = 0;
    @ApiModelProperty(name = "账号")
    private String account;
    @ApiModelProperty(name = "密码")
    private String password;
    @ApiModelProperty(name = "名称")
    private String name;
    @ApiModelProperty(name = "手机号")
    private String phone;
    @ApiModelProperty(name = "邮箱")
    private String email;
    @ApiModelProperty(name = "性别")
    private Integer sex = -1;
    private Integer status = 1;
    private Boolean isRoot = false;
    private Boolean isLock = false;
    private Date expiredTime;
    private Integer errorCount = 0;
    private Date lastTime = new Date();
    private Date createTime = new Date();

    @ApiModelProperty(name = "角色")
    @TableField(exist = false)
    private List<Integer> roleIdList = new ArrayList<>();
    @ApiModelProperty(name = "部门")
    @TableField(exist = false)
    private List<Integer> departIdList = new ArrayList<>();

}
